// 出现在菜单中的路由
const routes = []

// SUB_PROJECT 表示当前子项目名称，通过 definePlugin 注入
if (SUB_PROJECT === 'ysqgzt') {
  const target = require('./subsystems/ysqgzt.js').default
  routes.push(...target)
} else {
  // const target = require('./subsystems/default.js').default
  // const ysqxx = require('./subsystems/ysqxx.js').default
  // const hbsw = require('./subsystems/hbsw.js').default
  // routes.push(...target, ...ysqxx, ...hbsw)
  const subs = require.context('./subsystems', true, /\.js$/)
  subs.keys().forEach((key) => {
    routes.push(...subs(key).default)
  })
}

export default routes
